//类声明，每个Java程序中只能有一个类被声明为Public类
//与此同时，Java程序名必须与该类名称相同
public class Test7 {
	private boolean seedes; 								//成员变量声明
	private boolean seasonal;
	private float price;
	// 成员方法，设置水果属性
	public void setProperties(boolean seed, boolean season, float cost) {
		seedes = seed;
		seasonal = season;
		price = cost;
	}
	// 成员方法，输出水果属性
	public void printProperties() {
		if (seedes) {
			System.out.println("Fruit is seedes");
		} else {
			System.out.println("Fruit is seedless");
		}
		if (seasonal) {
			System.out.println("Fruit is seasonal");
		} else {
			System.out.println("Fruit is not seasonal");
		}
		System.out.println("Price is " + price);
	}
	// 类中包含了main方法，说明该类为Java程序的主类，即可以被运行的类
	// 这是Java Application应用程序的入口
	public static void main(String[] args) {
		boolean myseed, myseason;	  					//声明局部变量
		float mycost;
		myseed = true;			   						//为局部变量赋值
		myseason = true;
		mycost = 25.86F;
		Test7 MyFruit = new Test7();						//基于类创建对象
		// 调用setProperties方法，为成员变量赋值
		MyFruit.setProperties(myseed, myseason, mycost);
		MyFruit.printProperties(); 		// 调用printProperties方法，输出水果属性
	}
}